//
//  StaffLogic.h
//  QRMaster
//
//  Created by myApple on 15/12/21.
//  Copyright (c) 2015年 myApple. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CommunityInfoModel.h"

@interface CommunityInfoLogic : NSObject
typedef void(^communityInfoModelBlock)(CommunityInfoModel * communityInfoModel);
/**
 *  插入集群信息
 *
 *  @param model                集群信息model
 *  @param communityId          集群信息ID号
 *  @param member_timestamp     成员时间戳
 *  @param customer_timestamp   客户时间戳
 *  @param group_timestamp      组时间戳
 *  @param room_timestamp       房间时间戳
 */
-(void)insertCommunityData:(CommunityInfoModel *)model withCommuntiyId:(NSString *)communityId member_timestamp:(NSString *)member_timestamp customer_timestamp:(NSString *)customer_timestamp group_timestamp:(NSString *)group_timestamp room_timestamp:(NSString *)room_timestamp;

/**
 *  模型转化为字典
 *
 *  @param communityId 集群ID
 *
 *  @param block       集群用于接收查询到的数组
 */
-(void)queryCommunityInfo:(NSString *)communityId communityInfoModel:(communityInfoModelBlock)communityInfoModelBlock;


/**
 *  删除集群基本信息
 *
 *  @param communityId 集群ID号
 */
-(void)deleteCommunityInfo:(NSString *)communityId;

/**
 *  通过communityId和timeKey(时间戳的字段名)来更新时间戳
 *
 *  @param communityId   集群ID
 *
 *  @param timeKey       时间戳类型
 */
-(void)updateTimestamp:(NSString *)communityId  timeKey:(NSString *)timeKey timeKeyValue:(NSString *)timeKeyValue;

/**
 *  通过communityId和timeKey(时间戳的字段名)来查询到时间戳
 *
 *  @param communityId   集群ID
 *
 *  @param timeKey       时间戳类型
 */
-(NSString *)getTimestamp:(NSString *)communityId timeKey:(NSString *)timeKey;
@end
